package cn.enn.smart.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties("enn.security")
public class EnnSecurityProperties {

	private EnnSecurityValidateCodeProperties validateCode = new EnnSecurityValidateCodeProperties();

	private EnnMobileLoginProperties mobileLogin = new EnnMobileLoginProperties();

	private String signKey = "enn.smart";

	public EnnSecurityValidateCodeProperties getValidateCode() {
		return validateCode;
	}

	public void setValidateCode(EnnSecurityValidateCodeProperties validateCode) {
		this.validateCode = validateCode;
	}

	public EnnMobileLoginProperties getMobileLogin() {
		return mobileLogin;
	}

	public void setMobileLogin(EnnMobileLoginProperties mobileLogin) {
		this.mobileLogin = mobileLogin;
	}

	@Bean
	public EnnSecurityValidateCodeProperties validateCodeProperties() {
		return validateCode;
	}

	@Bean
	public EnnMobileLoginProperties mobileLoginProperties() {
		return mobileLogin;
	}

	public String getSignKey() {
		return signKey;
	}

	public void setSignKey(String signKey) {
		this.signKey = signKey;
	}
}
